#include <stdio.h>
#include <string.h>
/**
 * 1.strlen方法,测试字符串长度,从首元素开始,到结束符为止的长度,结束符不算(遇到'\0'结束)
 * 2.
 * */

int main(int argc, char const *argv[])
{
    char str[] = "helloworld!";
    int len = strlen(str);
    printf("len=%d\n",len);

    char str2[] = "\0hello";
    len = strlen(str2);
    printf("len2=%d\n",len);
    printf("len2sizeof=%lu\n",sizeof(str2));


    return 0;
}
